[v11.x backport] src: add .code and SSL specific error properties#26953
Closed
sam-github wants to merge 3 commits intonodejs:v11.x-stagingfrom
Closed
[v11.x backport] src: add .code and SSL specific error properties#26953sam-github wants to merge 3 commits intonodejs:v11.x-stagingfrom
sam-github wants to merge 3 commits intonodejs:v11.x-stagingfrom
Conversation
Add an error code property to invalid `secureProtocol` method exceptions. PR-URL: nodejs#24729 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
In nodejs#24729, the error was changed to be a TypeError, which is the standard type for this kind of error. However, it was Error in 11.x and earlier, so revert that single aspect, so the backport can be semver-minor.
SSL errors have a long structured message, but lacked the standard .code property which can be used for stable comparisons. Add a `code` property, as well as the 3 string components of an SSL error: `reason`, `library`, and `function`. PR-URL: nodejs#25093 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Collaborator
Contributor
Author
Contributor
Author
|
Bundling this into #26951 (comment) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport-of: #25093
It's on top of #26952, but can be rebased once #26952 lands.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes